﻿using System.ComponentModel.DataAnnotations;

namespace WebAPI.Controllers
{
    public class AddGood2
    {
        [Required(ErrorMessage="产品名不能为空")]
        [StringLength(50, ErrorMessage = "产品名不能大于50")]        
        public string Name { get; set; }

        public string Cover { get; set; }

        public int CateId { get; set; }

        [Range(0, 999.99)]
        public decimal Price { get; set; }

        public int Stock { get; set; }
    }
}